from .Selenium抽象类 import ECommerceAutomation
from .Selenium抽象类 import WebDriver,WebElement,Service,Options,By,Keys
from .Selenium抽象类 import abstractmethod
import typing

class ShopOnline_CreateProduct(ECommerceAutomation):
    def __init__(self):
        super().__init__()


    @abstractmethod
    def LoadConfigFile(self,config_file:str="config.json") -> typing.Self:
        pass


    @abstractmethod
    def OpenCreateProductPage(self) -> typing.Self:
        """打开创建产品页面"""
        pass

    
    @abstractmethod
    def SelectFirstCategory(self) -> typing.Self:
        """选择一级分类"""
        pass

    
    @abstractmethod
    def SelectSecondCategory(self) -> typing.Self:
        """选择二级分类"""
        pass

    
    @abstractmethod
    def SelectThirdCategory(self) -> typing.Self:
        """选择三级分类"""
        pass

    @abstractmethod
    def SelectfourthCategory(self) -> typing.Self:
        """选择四级分类"""
        pass
    
    @abstractmethod
    def GotoParamSettingPage(self) -> typing.Self:
        """跳转到参数设置页面"""
        pass

    
    @abstractmethod
    def FillProductTitle(self) -> typing.Self:
        """填写产品标题"""
        pass


    @abstractmethod
    def FillProductParams(self) -> typing.Self:
        """填写产品参数"""
        pass


    @abstractmethod
    def FillProductMaterial(self) -> typing.Self:
        """填写产品材质"""
        pass
    
    @abstractmethod
    def FillProductMainImage(self) -> typing.Self:
        """填写产品主图"""
        pass


    @abstractmethod
    def FillProductDetailImage(self) -> typing.Self:
        """填写产品详情图"""


    @abstractmethod
    def FillProductSku(self) -> typing.Self:
        """填写产品SKU"""
        pass


    @abstractmethod
    def FillProductVideo(self) -> typing.Self:
        """填写产品视频"""
        pass


    @abstractmethod
    def FillProductPrice(self) -> typing.Self:
        """填写产品价格"""
        pass


    @abstractmethod
    def FillProductInventory(self) -> typing.Self:
        """填写产品库存"""
        pass


    @abstractmethod
    def FillProductShopLabel(self) -> typing.Self:
        """填写产品商家编号"""
        pass


    @abstractmethod
    def FillProductLogistics(self) -> typing.Self:
        """填写产品物流信息"""
        pass

    @abstractmethod
    def FillSizeCharts(self) -> typing.Self:
        """填写产品尺码表"""
        pass
    
    def FindProductTitle(self) -> typing.Self:
        """查找产品标题"""
        from .Find_Same import Find_MainImageTitle
        Find_MainImageTitle(driver=self.driver,Picture_Path=self.main_images[0])